import { http } from "@/utils/http";
import { baseUrlApi, filerEmptyVal } from "../utils";

/** 获取基础档案-兑换规则列表 */
export const getExruledPage = (params?: object) => {
  return http.request<any>("get", baseUrlApi("/rule/page"), {
    params: filerEmptyVal(params)
  });
};

/** 基础档案--兑换规则列表-新增 */
export const exRuleAdd = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/rule/add"), { data });
};

/** 基础档案-兑换规则列表-编辑 */
export const exRuleUpdate = (data?: object) => {
  return http.request<any>("post", baseUrlApi("/rule/update"), { data });
};

/** 基础档案-兑换规则列表-删除 */
export const exRuleDelete = (id?: object) => {
  return http.request<any>("post", baseUrlApi(`/rule/delete?id=${id}`));
};
